﻿using Autodesk.AutoCAD.DatabaseServices;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace AutoCadConvert
{
    public class Envrionment: BspObject
    {
        public double MapScale=1;
        public Color WallColor;
        public double TempletMapAlpha=0.5;
        public double TempletMapRotation;
        public double WallHeight=2800;
        public bool IsShowInnerWallSize;
        public bool IsMirrorX;
        public bool IsMirrorY;

        public Envrionment(House house)
        {
            WallColor = new Color(1, 1, 1, 0.6);
        }

        public override IEnumerable<XElement> ToXml()
        {
            return new XElement[] {
                new XElement("MapScale",MapScale),
                new XElement("WallColor",WallColor.ToString()),
                new XElement("TempletMapAlpha",TempletMapAlpha),
                new XElement("TempletMapRotation",TempletMapRotation),
                new XElement("WallHeight",WallHeight*Unit),
                new XElement("IsShowInnerWallSize",IsShowInnerWallSize),
                new XElement("IsMirrorX",IsMirrorX?1:0),
                new XElement("IsMirrorY",IsMirrorY?1:0),
            };
        }

    }
}
